package individual;
import Environment.*;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.util.List;

import behavior.Behavior;

import debugger.Debugger;


import utilities.Vector;

/**
 * This is for extendability for other developers if they want to add other types of MovingEntities.
 * It will be easy to be able to use the Debugger for monitoring the trail of their MovingEntity
 * and will also be able to use Behavior which was designed to work with MovingEntities
 * 
 * @author ga-youngjoung
 *
 */
public abstract class MovingEntity extends Entity{
    //these are protected because they must be available to subclasses
	protected List<Vector> myTrail;
    protected Vector myVelocity;
    protected Debugger myDebugger;
    protected boolean isDead;
	protected Color myColor;
    
    public abstract void update(List<MovingEntity> allMovingEntities);
	
	public abstract void paint(Graphics pen);
	
	/**
     * Reports shape's center.
     *
     * @return center of shape
     */
    public Vector getCenter ()
    {
        return myCenter;
    }

    /**
     * Reports shape's size.
     *
     * @return size of shape
     */
    public Dimension getSize ()
    {
        return mySize;
    }

    /**
     * Changes shape's color.
     */
    public void setSize (int width, int height)
    {
        mySize = new Dimension(width, height);
    }

	/**
     * Reports shape's velocity.
     *
     * @return velocity of shape
     */
    public Vector getVelocity ()
    {
        return myVelocity;
    }

    /**
     * Reports shape's color.
     *
     * @return color of shape
     */
    public Color getColor ()
    {
        return myColor;
    }

    /**
     * Changes shape's color.
     */
    public void setColor (Color c)
    {
        myColor = c;
    }
	
	public boolean isDead(){
		return isDead;
	}
	
	public void setAsDead() {
		isDead = true;
	}
}
